<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
    <div class="aside">
        
        <div class="mod">
        	<div class="body">
            	
                <div class="well">
                    <h3>联系方式</h3>
                    公司名称：{$c['companyname']}<br/>
                    联系人：{$c['linkman']}<br/>
                    联系电话：{magic_image($c['telephone'])}<br/>
                    电子邮箱：{magic_image($c['email'])}<br/>
                    公司类型：{$c['genre']}<br/>
                    地　址：{$c['address']}<br/>          
                    公司网站：<a href="{url("?module=yellowpage&userid=$c[userid]")}">{url("?module=yellowpage&userid=$c[userid]")}</a><br/>
                    <a class="button" href="{url("?module=yellowpage&userid=$c[userid]")}">查看公司详情</a>
                    <a class="button" href="{$SETTING[siteurl]}yellowpage/collect.php?userid={$rs[userid]}&title={$rs[title]}&callback_js=callback_js&referer={urlencode(URL)}">收藏此信息</a>
                    <br/>
                    
                    <img src="{$c['logo']}" alt="公司标志" width="240"/>
                </div>
        
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">产品库大类列表</div>
            <div class="body">
            	<ul>
                {get sql="SELECT catname,catid FROM `table_category` WHERE module = 'yp' AND parentid = '0' ORDER BY listorder ASC"}
                <li><a href="{url('product',$r['catid'])}">{$r['catname']}</a></li>
                {/get}
              </ul>
            </div>
        </div>
        
        <div class="mod">
        	<div class="head">浏览过的产品</div>
            <div class="body">
            	<ul>
                  {if $prowhere}
                  {get sql="SELECT id,title,thumb,url FROM `table_yellowpage_product` WHERE id IN ($prowhere) AND status = '99' ORDER BY FIND_IN_SET(id,'$prowhere')" rows="10"}
                  <li><a href="{url($r[url])}"><img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/></a><a href="{url($r[url])}" title="{$r['title']}">{$r['title']}</a></li>
                  {/get}
                  {else}
                  <li>您还没有浏览过任何商品</li>
                  {/if}
                  </ul>
            </div>
        </div>
        
        <div class="mod">
        	<div class="head">最新产品</div>
            <div class="body">
            	 <ul>
                {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid,p.url FROM `table_yellowpage_product` `p`,`table_member_company` `c` WHERE c.userid = p.userid AND p.status = '99' ORDER BY id DESC" rows="10"}
                    <li>
                        <img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/>
                        <a href="{url($r[url])}" title="{$r['title']}"><strong>{str_cut($r['title'],20,'')}</strong></a>
                        <span><a href="{url($r['userid'])}" title="{$r['companyname']}">{str_cut($r['companyname'],20,'')}</a></span>
                    </li>
                {/get}
              </ul>
            </div>
        </div>
        
    </div>
    
    <div class="main">
    
    	
        <ul class="breadcrumb">
          <li><a href="#">首页</a> <span class="divider">/</span></li>
          <li><a href="#">企业黄页</a> <span class="divider">/</span></li>
          <li><a href="#">商机</a> <span class="divider">/</span></li>
          <li class="active">商机信息</li>
        </ul> 
        
        {if $rs[userid] == $_userid || $_userid == 1}
            <a href="{url("?module=$module&file=$file&action=edit&id=$id")}" class="button"><i class="icon-edit"></i>修改</a>
            <a href="javascript:if(confirm('确定要删除吗？')) location='?module={$module}&file={$file}&action=delete&id={$id}'" class="button button-danger"><i class="icon-remove icon-white"></i>删除</a>
        {/if} 
        
        <div class="mod">
        	<div class="body row">
            	
            	<div class="span6">
                	
                 {$rs['title']}{if ($rs['inputtime']+3600*24*$rs['period'] < time())}   [ 已过期 ]{/if}
               
                  <p>所属分类：<a href="{url('buy',$rs[catid])}">{$CATEGORY[$rs['catid']][catname]}</a>　浏览量：{$rs['hits']}次</p>
                  {if $rs['tid'] == 2}
                  <p>接受价格：{if $rs['price']}￥{$rs['price']}元左右/{$rs[quantifier]}{else}<a href="{url($c[userid],$c[sitedomain])}/category-guestbook/label-buy/id-{$rs['id']}.html">与我联系</a>{/if}</a></p>
                  {else}
                  <p>　单　价：{if $rs['price']}{$rs[price]}元/{$rs[quantifier]}{else}<a href="{url($c[userid],$c[sitedomain])}/category-guestbook/label-buy/id-{$rs['id']}.html">我要询价</a>{/if}</p>
                  {/if}
                  {if $rs[standard]}<p>产品型号：{$rs[standard]}</p>{/if}
                  <p>　类　型：<a href="{$M[url]}buy.php?tid={$rs['tid']}">{if $rs['tid'] == 1}供应{elseif $rs['tid'] == 2}求购{elseif $rs['tid'] == 3}二手{elseif $rs['tid'] == 4}促销{/if}</a></p>
                  <p>发布时间：{date("Y-m-d",$rs['inputtime'])}　　更新时间：{date("Y-m-d",$rs['updatetime'])}</p>
                  {if $rs[period]}<p>有效期限：{$rs[period]}天</p>{/if}
        
        
                </div>
            	<div class="span2">
                <a target="_blank" title="点此查看大图"  href="{thumb($rs['thumb'],349,260)}"><img alt="{$rs['title']}" src="{thumb($rs['thumb'],349,260)}" width="349" height="260"/></a>
                </div>
            </div>
        </div>
        
        
        
        <div class="mod">
        	<div class="head">商机介绍</div>
            <div class="body">
            	{$rs['content']}
            </div>
        </div>
    
    </div>
</div>
    

{template 'footer.html'}
